package cn.edu.sdjzu.xg.bysj.domain;



import java.io.Serializable;
import java.util.Set;

public final class Teacher extends Actor implements Comparable<Teacher>,Serializable {
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String no;
	private String name;
	private ProfTitle profTitle;
	private Degree degree;
	private Department department;
	private  User user;
	private Set<GraduateProject> projects;
	public Teacher(Integer id,
			String name, String no,User user) {
		super();
		this.id = id;
		this.name = name;
		this.no = no;
		this.user = user;
	}
	public Teacher(Integer id,
				   String name, String no) {
		super();
		this.id = id;
		this.name = name;
		this.no = no;

	}
	public Teacher(
			String name, String no,Department department) {
		super();
		this.name = name;
		this.no = no;
		this.department =department;
	}
	public Teacher(
			String name, String no,User user) {
		super();
		this.name = name;
		this.no = no;
		this.user = user;
	}
	public Teacher(
			String name, String no) {
		super();
		this.name = name;
		this.no = no;
	}
	public Teacher(Integer id,
				   String name,
				   String no,
				   User user,
				   ProfTitle title,
				   Degree degree,

				   Department department) {
		this(name, no,user, title, degree, department);
		this.id = id;

	}

	public Teacher(
			String name,
			String no,
			User user,
			ProfTitle title,
			Degree degree,
			Department department) {
		this(name, no, user);
		this.profTitle = title;
		this.degree = degree;
		this.department = department;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ProfTitle getTitle() {
		return this.profTitle;
	}

	public void setTitle(ProfTitle title) {
		this.profTitle = title;
	}

	public Degree getDegree() {
		return degree;
	}

	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public void setDegree(Degree degree) {
		this.degree = degree;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public Set<GraduateProject> getProjects() {
		return projects;
	}

	public void setProjects(Set<GraduateProject> projects) {
		this.projects = projects;
	}






	@Override
	public int compareTo(Teacher o) {
		// TODO Auto-generated method stub
		return this.id-o.getId();
	}


	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation
	 * of this object.
	 */
	public String toString()
	{
		final String TAB = "    ";

		String retValue = "";

		retValue = "Teacher ( "
				+ super.toString() + TAB
				+ "id = " + this.id + TAB
				+ "name = " + this.name + TAB
				+ "no = " + this.no + TAB
				+ "user = " + this.user + TAB
				+ " )";

		return retValue;
	}

}
